﻿@inject IStringLocalizer<DropdownColor> Localizer

<div class="row g-3">
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string" Items="Items" Color="Color.Primary" />
    </div>
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string" Items="Items" Color="Color.Info" />
    </div>
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string" Items="Items" Color="Color.Warning" />
    </div>
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string" Items="Items" Color="Color.Danger" />
    </div>
</div>

@code {
    private List<SelectedItem> Items { get; set; } = new List<SelectedItem> { };

    /// <summary>
    /// OnInitialized
    /// </summary>
    protected override void OnInitialized()
    {
        base.OnInitialized();

        Items = new List<SelectedItem>
        {
            new SelectedItem{ Text=Localizer["Item1"], Value="0"},
            new SelectedItem{ Text=Localizer["Item2"], Value="1"},
            new SelectedItem{ Text=Localizer["Item3"], Value="2"},
        };
    }
}
